<?php

/*
 * модель сообщения
 */
class Model_Message{
    private $mesData = array(
        'id' => '0',
        'author' => '',
        'date' => '',
        'text' => '',
        'adressat' => '',
        'autherName' => ''
    );
    
    public function __construct($data = null){
        if(isset($data)){
            foreach($data as $k => $v){
                $this->mesData[$k] = $v;
            }
        }
    }
    public function getMesId() {
        return $this->mesData['id'];
    }

    public function getMesAuthor() {
        return $this->mesData['author'];
    }

    public function getMesDate() {
        return $this->mesData['date'];
    }

    public function getMesText() {
        return $this->mesData['text'];
    }
    public function getAdressat() {
        return $this->mesData['adressat'];
    }
    public function getAutherName(){
        return $this->mesData['autherName'];
    }
}
